import os

from common.tools import get_path
import os


import os


def print_directory_structure(root_path, indent="", ignore_dirs=[], ignore_files=[]):
    items = os.listdir(root_path)
    for item in items:
        item_path = os.path.join(root_path, item)
        if os.path.isdir(item_path):
            if item in ignore_dirs:  # 检查是否是要忽略的文件夹
                continue
            print(f"{indent}├──{item}")
            new_indent = indent + "│   "
            print_directory_structure(item_path, new_indent, ignore_dirs, ignore_files)
        else:
            if item in ignore_files:  # 检查是否是要忽略的文件
                continue
            print(f"{indent}└──{item}")


if __name__ == "__main__":
    project_root = get_path()
    ignore_list = ["venv", "__pycache__",".pytest_cache",'.git',".idea","__init__"]
    ignore_file_list = ["__init__.py",]
    print_directory_structure(project_root, ignore_dirs=ignore_list, ignore_files=ignore_file_list)